package cn.edu.dgut.css.sai.springsecuritygiteeexperiment;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.Map;

/**
 * Created by bothin
 * At 2020/5/14 23:18
 * Description:
 */
public class CustomUserDetail extends User {
    private Map<String, Object> userInfo;

    public CustomUserDetail(String username, String password, Collection<? extends GrantedAuthority> authorities,Map<String, Object> userInfo) {
        super(username, password, authorities);
        this.userInfo = userInfo;
    }

    public Map<String, Object> getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(Map<String, Object> userInfo) {
        this.userInfo = userInfo;
    }
}
